Amir's Gaitsequence Aiming, 0-5 Avadd
wav
Posted: Feb 12 2005, 10:41 PM
Report Post


Member


Group: Admin
Posts: 36
Member No.: 9
Joined: 12-February 05



Credits Amir

First we need to open up aimbot.cpp

Find the following functions.
Code:

void OriginAimbot::draw_player_vecs(int ax)


Now somewhere in the body of the function you should see a
CODE
if(cvar.gsaim)
in there

Add the following code within the if statement's body.

CODE


if (cvar.gsaim)
  {
     switch (vPlayers[ax].getEnt()->curstate.gaitsequence)
     {
     case 1:
        {
           pos = AimVecsS.begin();
           end = AimVecsS.end();
        }
        break;
     case 2:
        {
           pos = AimVecsD.begin();

           end = AimVecsD.end();
        }
        break;

     case 3:
        {
           pos = AimVecsW.begin();
           end = AimVecsW.end();
        }

          break;
     case 4:
        {
               pos = AimVecsR.begin();
               end = AimVecsR.end();
        }
        break;
     case 5:
        {
               pos = AimVecsDM.begin();
               end = AimVecsDM.end();
        }
        break;
     case 6:
        {
           pos = AimVecsJ.begin();
           end = AimVecsJ.end();
        }
        break;
     }
  }


Next function.

Find this function.

Code:
CODE

void OriginAimbot::CalcTargetSpot(float *out)


As before you should see a if(cvar.gsaim) statement.

Replace the body of the function.


CODE

if (cvar.gsaim)
  {
     switch (ent->curstate.gaitsequence)
     {
     case 1:
        {
           if (AimVecsS.size() > 0)
           {
              f = AimVecsS[0].f;
              h = AimVecsS[0].h;
              r = AimVecsS[0].r;
           }
        }
        break;
     case 2:
        {
        if (AimVecsD.size() > 0)
        {
              f = AimVecsD[0].f;
              h = AimVecsD[0].h;
              r = AimVecsD[0].r;
           }
        }
        break;
     case 3:
        {
        if (AimVecsW.size() > 0)
        {
              f = AimVecsS[0].f;
              h = AimVecsS[0].h;
              r = AimVecsS[0].r;
           }
        }
        break;
     case 4:
        {
        if (AimVecsR.size() > 0)
        {
              f = AimVecsR[0].f;
              h = AimVecsR[0].h;
              r = AimVecsR[0].r;
           }
        }
        break;
     case 5:
        {
        if (AimVecsDM.size() > 0)
        {
              f = AimVecsDM[0].f;
              h = AimVecsDM[0].h;
              r = AimVecsDM[0].r;
           }
        }
        break;
     case 6:
        {
        if (AimVecsJ.size() > 0)
        {
              f = AimVecsJ[0].f;
              h = AimVecsJ[0].h;
              r = AimVecsJ[0].r;
           }
        }
        break;
     }
  }


Next thing to do is open up aimbot.h

under
CODE
class OriginAimbot


add this

Code:
CODE

  vector<aimvec> AimVecsS; // GaitSequence 1 = (Standing)
  vector<aimvec> AimVecsW; //GaitSequence 3 = (Walking)
  vector<aimvec> AimVecsD; // GaitSequence 2 = (Duck Idle)
  vector<aimvec> AimVecsDM; // GaitSequence 5 = (Duck Moving)
  vector<aimvec> AimVecsJ; // GaitSequence 6 = (Jumping)
  vector<aimvec> AimVecsR; // GaitSequence 4 = (Running)


Client.cpp


CODE

void func_avlist(void)
{
 
  if(cvar.gsaim<=0){

   Con_Echo("Amir's Gaitsequence aiming is not active.");
   Con_Echo("To activate, type gsaim 1 then type gsaim2 0");
  }

  int dmmy = cmd.argI(1);
 
  if (dmmy == 1)
  {
      Con_Echo("Listing AimVecs(1) Ducking\n");
      for (vector<aimvec>::iterator si = gAimbot.AimVecsD.begin(); si != gAimbot.AimVecsD.end();++si)
      {
          Con_Echo("Height: &w%f&a Forward: &w%f&a Right: &w%f&a\n",si->h,si->f,si->r);
     }
  }
  if (dmmy == 0)
  {
      Con_Echo("Listing AimVecs(0) Standing\n");
      for (vector<aimvec>::iterator si = gAimbot.AimVecsS.begin(); si != gAimbot.AimVecsS.end();++si)
      {
        Con_Echo("Height: &w%f&a Forward: &w%f&a Right: &w%f&a\n",si->h,si->f,si->r);
      }
  }
  if (dmmy == 4)
  {
     Con_Echo("Listing AimVecs(4) Duck-Walk\n");
     for (vector<aimvec>::iterator si = gAimbot.AimVecsDM.begin(); si != gAimbot.AimVecsDM.end();++si)
     {
        Con_Echo("Height: &w%f&a Forward: &w%f&a Right: &w%f&a\n",si->h,si->f,si->r);
     }
  }
  if (dmmy == 3)
  {
     Con_Echo("Listing AimVecs(3) Running\n");
     for (vector<aimvec>::iterator si = gAimbot.AimVecsR.begin(); si != gAimbot.AimVecsR.end();++si)
     {
        Con_Echo("Height: &w%f&a Forward: &w%f&a Right: &w%f&a\n",si->h,si->f,si->r);
     }
  }
 
  if (dmmy == 5)
  {
     Con_Echo("Listing AimVecs(5) Jumping\n");
     for (vector<aimvec>::iterator si = gAimbot.AimVecsJ.begin(); si != gAimbot.AimVecsJ.end();++si)
     {
        Con_Echo("Height: &w%f&a Forward: &w%f&a Right: &w%f&a\n",si->h,si->f,si->r);
     }
  }
  if (dmmy == 2)
  {
     Con_Echo("Listing AimVecs(2) Walking\n");
     for (vector<aimvec>::iterator si = gAimbot.AimVecsW.begin(); si != gAimbot.AimVecsW.end();++si)
     {
        Con_Echo("Height: &w%f&a Forward: &w%f&a Right: &w%f&a\n",si->h,si->f,si->r);
     }
  }
}

void func_avclear(void)
{
gAimbot.AimVecsS.clear();
gAimbot.AimVecsD.clear();
gAimbot.AimVecsDM.clear();
gAimbot.AimVecsJ.clear();
gAimbot.AimVecsR.clear();
gAimbot.AimVecsW.clear();
}

void func_avadd(void)
{
  aimvec av;
  int duck = cmd.argI(1);
  int arg = 2;
  while(*cmd.argC(arg))
  {
     av.h = cmd.argF(arg++);
     av.f = cmd.argF(arg++);
     av.r = cmd.argF(arg++);
     if (duck == 1)  
     {
         gAimbot.AimVecsD.push_back(av);
     }
     if (duck == 0)
     {
  gAimbot.AimVecsS.push_back(av);
     }
     if (duck == 2)
     {
        gAimbot.AimVecsW.push_back(av);
     }
     if (duck == 3)
     {
        gAimbot.AimVecsR.push_back(av);
     }
     if (duck == 4)
     {
    gAimbot.AimVecsDM.push_back(av);
     }
 if (duck == 5)
 {
        gAimbot.AimVecsJ.push_back(av);
 }
  }
}



CODE

REGISTER_COMMAND(avadd      )
REGISTER_COMMAND(avlist     )
REGISTER_COMMAND(avclear    )


Congratutlations, you have added amir's gsaim, if you need 0-2 simply remove running, duckwalk, walk,and running.
Mini Profile
Top
Septic
Posted: Feb 14 2005, 10:42 PM
Report Post


Still There Bitch


Group: Members
Posts: 19
Member No.: 24
Joined: 14-February 05



Nice, is there a way to toggle it with gsaim 0 and gsaim 1? I know there is, but is that a lot more complicated?


--------------------
user posted image
Mini Profile
Top
« Next Oldest | Tutorials | Next Newest »

Topic Options



Hosted for free by InvisionFree (Terms of Service: Updated 4/7/04) | Powered by Invision Power Board v1.3 Final © 2003 IPS, Inc.
Page creation time: 0.0222 seconds